/*
 * JOY电子商务网运营事业部
 * 中国移动通信集团设计院有限公司
 * B2BJOY.COM  OPERATION  DIVISION
 * China Mobile Group Design Institute Co., Ltd
 */

package com.uhaou.system.model;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;

import org.apache.commons.lang.StringUtils;

import com.uhaou.common.base.*;
import com.uhaou.common.util.*;

import cn.org.rapid_framework.util.*;
import cn.org.rapid_framework.web.util.*;
import cn.org.rapid_framework.page.*;
import cn.org.rapid_framework.page.impl.*;
 
import com.uhaou.common.base.BaseEntity;

/**
 * @author  jiangcheng
 * @version 1.0
 * @since 1.0
 */


public class SysFunction extends BaseEntity implements java.io.Serializable {
	private static final long serialVersionUID = 5454155825314635342L;
	
	public static final String TABLE_ALIAS = "Sys_Function";
	public static final String ALIAS_ID = "id";
	public static final String ALIAS_FUNC_TYPE = "funcType";
	public static final String ALIAS_FUNC_NAME = "funcName";
	public static final String ALIAS_PARENT_ID = "parentId";
	public static final String ALIAS_FUNC_URL = "funcUrl";
	public static final String ALIAS_DELETED = "deleted";
	public static final String ALIAS_HIDED = "hided";
	public static final String ALIAS_FUNC_CODE = "funcCode";
	public static final String ALIAS_CREATE_TIME = "createTime";
	public static final String ALIAS_CREATOR = "creator";
	public static final String ALIAS_MEMO = "memo";
	
	//date formats
	public static final String FORMAT_CREATE_TIME = DATE_FORMAT;
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
 
	@Length(max=32)
	private java.lang.String id;
	@Length(max=2)
	private java.lang.String funcType;
	@Length(max=50)
	private java.lang.String funcName;
	@Length(max=32)
	private java.lang.String parentId;
	@Length(max=200)
	private java.lang.String funcUrl;
	@Length(max=1)
	private java.lang.String deleted;
	@Length(max=1)
	private java.lang.String hided;
	
	private java.lang.String funcCode;
	
	private java.util.Date createTime;
	@Length(max=32)
	private java.lang.String creator;
	
	private int priors;
	
	@Length(max=200)
	private java.lang.String memo;
	//columns END

	public SysFunction(){
	}

	public SysFunction(
		java.lang.String id
	){
		this.id = id;
	}

	public void setId(java.lang.String value) {
		this.id = value;
	}
	
	public java.lang.String getId() {
		return this.id;
	}
	public void setFuncType(java.lang.String value) {
		this.funcType = value;
	}
	
	public java.lang.String getFuncType() {
		return this.funcType;
	}
	public void setFuncName(java.lang.String value) {
		this.funcName = value;
	}
	
	public java.lang.String getFuncName() {
		return this.funcName;
	}
	public void setParentId(java.lang.String value) {
		this.parentId = value;
	}
	
	public java.lang.String getParentId() {
		return this.parentId;
	}
	public void setFuncUrl(java.lang.String value) {
		this.funcUrl = value;
	}
	
	public java.lang.String getFuncUrl() {
		return this.funcUrl;
	}
	public void setDeleted(java.lang.String value) {
		this.deleted = value;
	}
	
	public java.lang.String getDeleted() {
		return this.deleted;
	}
	public void setHided(java.lang.String value) {
		this.hided = value;
	}
	
	public java.lang.String getHided() {
		return this.hided;
	}
	public void setFuncCode(java.lang.String value) {
		this.funcCode = value;
	}
	
	public java.lang.String getFuncCode() {
		return this.funcCode;
	}
	public String getCreateTimeString() {
		return DateConvertUtils.format(getCreateTime(), FORMAT_CREATE_TIME);
	}
	public void setCreateTimeString(String value) {
		setCreateTime(DateConvertUtils.parse(value, FORMAT_CREATE_TIME,java.util.Date.class));
	}
	
	public void setCreateTime(java.util.Date value) {
		this.createTime = value;
	}
	
	public java.util.Date getCreateTime() {
		return this.createTime;
	}
	public void setCreator(java.lang.String value) {
		this.creator = value;
	}
	
	public java.lang.String getCreator() {
		return this.creator;
	}
	public void setMemo(java.lang.String value) {
		this.memo = value;
	}
	
	public java.lang.String getMemo() {
		return this.memo;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("FuncType",getFuncType())
			.append("FuncName",getFuncName())
			.append("ParentId",getParentId())
			.append("FuncUrl",getFuncUrl())
			.append("Deleted",getDeleted())
			.append("Hided",getHided())
			.append("FuncCode",getFuncCode())
			.append("CreateTime",getCreateTime())
			.append("Creator",getCreator())
			.append("Memo",getMemo())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof SysFunction == false) return false;
		if(this == obj) return true;
		SysFunction other = (SysFunction)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}

	public int getPriors() {
		return priors;
	}

	public void setPriors(int priors) {
		this.priors = priors;
	}
 
}

